home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / svgabg.exe / SVGA256.INC < prev    next >
Text File  |  1992-06-25  |  983b  |  36 lines

  1. (************************************************)
  2. (*                         *)
  3. (*     SuperVGA 256 BGI driver defines    *)
  4. (*        Copyright (c) 1991        *)
  5. (*        Jordan Hargraphix Software        *)
  6. (*                        *)
  7. (************************************************)
  8.  
  9. type DacPalette256 = array[0..255] of array[0..2] of Byte;
  10.  
  11. (* These are the currently supported modes *)
  12. const
  13.   SVGA320x200x256    = 0;    (* 320x200x256 Standard VGA *)
  14.   SVGA640x400x256    = 1;    (* 640x400x256 Svga *)
  15.   SVGA640x480x256    = 2;    (* 640x480x256 Svga *)
  16.   SVGA800x600x256    = 3;    (* 800x600x256 Svga *)
  17.   SVGA1024x768x256    = 4;    (* 1024x768x256 Svga *)
  18.  
  19. (* Setvgapalette sets the entire 256 color palette *)
  20. (* PalBuf contains RGB values for all 256 colors   *)
  21. (* R,G,B values range from 0 to 63               *)
  22. procedure SetVGAPalette256(PalBuf : DacPalette256);
  23. var
  24.   Reg : Registers;
  25.  
  26. begin
  27.   reg.ax := $1012;
  28.   reg.bx := 0;
  29.   reg.cx := 256;
  30.   reg.es := Seg(PalBuf);
  31.   reg.dx := Ofs(PalBuf);
  32.   intr($10,reg);
  33. end;
  34.  
  35.  
  36.